import {
	createRouter,
	createWebHashHistory
} from "vue-router"

import Index from "~/pages/index.vue";
import Login from "~/pages/login.vue";
import NotFound from "~/pages/404.vue";

const routes = [{
		path: '/',
		component: Index
	}, {
		path: '/login',
		component: Login
	},
	// 将匹配所有内容并将其放在 `$route.params.pathMatch` 下
	{
		path: '/:pathMatch(.*)*',
		name: 'NotFound',
		component: NotFound
	},
];

const router = createRouter({
	history: createWebHashHistory(),
	routes
})


export default router